package com.zzj.model.api;

import com.zzj.model.entity.LikeEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;


public interface LikeApi {
    /**
     * targetId fromUsername 删除点赞
     * 删除前查询并返回
     * @param targetId
     * @param fromUsername
     * @return
     */
    @PostMapping("remove")
    LikeEntity remove(@RequestParam("targetId") int targetId,
                      @RequestParam("fromUsername") String fromUsername);


    @PostMapping("save")
    LikeEntity save(@RequestParam("targetId") int targetId,
                    @RequestParam("targetType") int targetType,
                    @RequestParam("toUsername") String toUsername,
                    @RequestParam("fromUsername") String fromUsername);
}
